#include <stdio.h>
int findMax(int[], int); /*function prototype*/

int main()
{
#define NUMELS 5
    int nums[NUMELS] = {2, 18, 1, 27, 16};

    printf("size of nums:%d\n",sizeof(nums));
    printf("The maximum value is %d\n", findMax(nums, NUMELS));

    return 0;
}

int findMax(int vals[], int numEls) /*find the maximum value*/
{
    
    int i, max = vals[0];
    printf("size of vals:%d\n",sizeof(vals));
    for (i = 1; i < numEls; i++)
        if (max < vals[i])
            max = vals[i];

    return (max);
}